<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<title>v-model</title>
	<style>
		* {
			margin: 0;
			padding: 0;
		}
		body {
			padding: 50px;
		}
	</style>
</head>
<body>

	<div id="app">
		
		<cmp1 @change="test1" @submit="test2" />

	</div>
	<script src="../lib/vue.3.4.js"></script>
	<script>
		var app = Vue.createApp({
			data () {
				return {
					
				}
			},
			methods: {
				test1() {},
				test2() {}
			}
		})
		
		app.component("cmp1", {
			template: `<div>组件事件列表：</div>`,
			emits: ['change'],
			mounted() {
				// 注意：如果使用emits显式声明了事件，$attrs中，就不会显示
				console.log(this.$attrs);
			}
		})

		app.mount('#app');
	</script>
</body>	
</html>